<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<?php

$theTitle = wp_title(" - ", false);

if($theTitle != "") {
?>
<title><?php echo wp_title("",false); ?></title>
<?php
}
else{
?>
<title><?php bloginfo('name'); ?></title>
<?php
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS" href="<?php echo get_feed_url() ?>" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon" />
<link rel="icon" href="<?php bloginfo('template_directory'); ?>/favicon.gif" type="image/gif" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/script.js"></script>
<?php wp_head(); ?>
</head>
<body>
<div id="page">
<!-- start header -->
<div id="header">
<div id="tag-cloud"></div>
<div class="LS"></div>

   <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
   <p class="Desc"><?php bloginfo('description'); ?></p>
   
<div id="taotao"></div>
<?php show_refer_in();?>
</div>

<div id="menu"><div id="PageRank"><img id="PageRankImg" alt="PRank" title="PageRank" width="44" height="15" src="<?php bloginfo('template_directory'); ?>/images/ranking.gif" /></div>
   <ul id="nav">
   <li<?php if(is_home()|| is_archive() || is_single())echo ' class="current_page_item"'; ?>><a href="<?php echo get_option('home'); ?>/">Blog</a></li>

<?php

	wp_list_pages('&sort_column=menu_order&title_li=&echo=1&exclude=473,474,291,296,529,417');//生成菜单列，后面的数字为需要排除的页面ID
	
	if(is_page()){//当前页为其他不在菜单栏上的页面时添加一个tab在菜单栏上的显示
		$page_array = array(473,474,291,296,529,417);//其他不在菜单栏上的页面ID，换成你需要的。
		if(in_array($post->ID,$page_array)){
			$title = get_post_meta($post->ID, 'tips', true);
			if(!$title)$title=$post->post_title;
				echo "<li class=\"current_page_item\"><a title=\"{$title}\" href=\"".get_permalink($post->ID)."\">{$post->post_title}</a></li>";
		}
	}else if(is_search()){//搜索结果时添加一个tab在菜单栏上的显示
		$keyword = str_replace('/search/','',$_SERVER['REQUEST_URI']);
		echo "<li class=\"current_page_item\"><a title=\"点击使用Google搜索本站\" href=\"/search\">搜索 \"{$keyword}\"</a></li>";
	}
?>
</ul> 
</div>
 
 
